本案例中,有13家航空公司(DMUs)以3个输入和2个输出来估计效率。输入数据包括载客量、燃油和员工数量,输出数据包括旅客人数和货运数量
DMU | Aircraft (fleet size) |
Fuel (gallons) |
Employee (units) |
Passenger (passenger-miles) |
Freight (ton-miles) |
---|---|---|---|---|---|
A | 109 | 392 | 8259 | 23756 | 870 |
B | 115 | 381 | 9628 | 24183 | 1359 |
C | 767 | 2673 | 70923 | 163483 | 12449 |
D | 90 | 282 | 9683 | 10370 | 509 |
E | 461 | 1608 | 40630 | 99047 | 3726 |
F | 628 | 2074 | 47420 | 128635 | 9214 |
G | 81 | 75 | 7115 | 11962 | 536 |
H | 153 | 458 | 10177 | 32436 | 1462 |
I | 455 | 1722 | 29124 | 83862 | 6337 |
J | 103 | 400 | 8987 | 14618 | 785 |
K | 547 | 1217 | 34680 | 99636 | 6597 |
L | 560 | 2532 | 51536 | 135480 | 10928 |
M | 423 | 1303 | 32683 | 74106 | 4258 |
Python 3.7.4 + PuLP 2.0
引入必要的包
from pulp import LpProblem, LpMinimize, LpVariable, lpSum, value
构建数据集
K = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M"]
I = ["Aircraft", "Fuel", "Employee"]
J = ["Passenger", "Freight"]
引入数据
X={'Aircraft': {'A': 109.0,
'B': 115.0,
'C': 767.0,
'D': 90.0,
'E': 461.0,
'F': 628.0,
'G': 81.0,
'H': 153.0,
'I': 455.0,
'J': 103.0,
'K': 547.0,
'L': 560.0,
'M': 423.0},
'Fuel': {'A': 392.0,
'B': 381.0,
'C': 2673.0,
'D': 282.0,
'E': 1608.0,
'F': 2074.0,
'G': 75.0,
'H': 458.0,
'I': 1722.0,
'J': 400.0,
'K': 1217.0,
'L': 2532.0,
'M': 1303.0},
'Employee': {'A': 8259.0,
'B': 9628.0,
'C': 70923.0,
'D': 9683.0,
'E': 40630.0,
'F': 47420.0,
'G': 7115.0,
'H': 10177.0,
'I': 29124.0,
'J': 8987.0,
'K': 34680.0,
'L': 51536.0,
'M': 32683.0}}
Y={'Passenger': {'A': 23756.0,
'B': 24183.0,
'C': 163483.0,
'D': 10370.0,
'E': 99047.0,
'F': 128635.0,
'G': 11962.0,
'H': 32436.0,
'I': 83862.0,
'J': 14618.0,
'K': 99636.0,
'L': 135480.0,
'M': 74106.0},
'Freight': {'A': 870.0,
'B': 1359.0,
'C': 12449.0,
'D': 509.0,
'E': 3726.0,
'F': 9214.0,
'G': 536.0,
'H': 1462.0,
'I': 6337.0,
'J': 785.0,
'K': 6597.0,
'L': 10928.0,
'M': 4258.0}}
使用 CRS DEA 模型的输入导向型模型的对偶形式.
model = LpProblem('CRS_model', LpMinimize)
theta_r = LpVariable(f'theta_r')
lambda_k = LpVariable.dicts(f'lambda_k', lowBound=0, indexs=K)
model += theta_r #Dual formulation
设置约束条件 $$ \begin{gathered} \text { s.t. } \sum_{k=1}^{K} \lambda_{k} X_{k i} \leq \theta_{r} X_{r i}, \forall i \\ \sum_{k=1}^{K} \lambda_{k} Y_{k j} \geq Y_{r j}, \forall j \\ \lambda_{k} \geq 0, \forall k \end{gathered} $$
for i in I:
model += lpSum([
lambda_k[k] * X[i][k]
for k in K]) <= theta_r * float(X[i][K[r]])
for j in J:
model += lpSum([
lambda_k[k] * Y[j][k]
for k in K]) >= float(Y[j][K[r]])
求解模型
model.solve()
使用VRS DEA模型输入导向型的对偶形式
model = LpProblem('VRS_model', LpMinimize)
theta_r = LpVariable(f'theta_r')
lambda_k = LpVariable.dicts(f'lambda_k', lowBound=0, indexs = K)
model += theta_r #Dual formulation
for i in I:
model += lpSum([
lambda_k[k] * X[i][k]
for k in K]) <= theta_r * float(X[i][K[r]])
for j in J:
model += lpSum([
lambda_k[k] * Y[j][k]
for k in K]) >= float(Y[j][K[r]])
model += lpSum([ lambda_k[k] for k in K]) == 1 #Convex Combination for r'
model.solve()
调用函数获取输出
OE_outputText = 'These are OE of all DMUs\n-------------\n'
TE_outputText = 'These are TE of all DMUs\n-------------\n'
SE_outputText = 'These are SE of all DMUs\n-------------\n'
for k in range(len(K)):
OE_text, OE_val = getOverallEfficiency(k)
TE_text, TE_val = getTechnicalEfficiency(k)
OE_outputText += OE_text
TE_outputText += TE_text
SE_outputText += f'{K[k]}:{round(OE_val / TE_val, 3)}\n'
print(OE_outputText)
print(TE_outputText)
print(SE_outputText)
我们发现研究C、G H,我,K和L都处于一个更好的效率状态,D J和M从这个表处于低效率状态。可以将规模效应SE与输入和输出数据分解来理解和提高低效率状态。
DMU | OE | TE | SE |
---|---|---|---|
A | 0.978 | 1 | 0.978 |
B | 0.968 | 1 | 0.968 |
C | 1 | 1 | 1 |
D | 0.537 | 0.9 | 0.597 |
E | 0.969 | 0.996 | 0.973 |
F | 0.978 | 1 | 0.978 |
G | 1 | 1 | 1 |
H | 1 | 1 | 1 |
I | 1 | 1 | 1 |
J | 0.619 | 0.886 | 0.698 |
K | 1 | 1 | 1 |
L | 1 | 1 | 1 |
M | 0.835 | 0.849 | 0.984 |
当我想知道如何对不同的航空公司或银行分支机构进行基准测试时,DEA是一种评估效率的可靠技术。该技术适用于任何需要评估同质单元效率的行业的执行人员或分析师,特别是在制造业。在应用DEA模型时,各单元之间可以通过相对效率进行比较,但不能告诉我们如何提高效率。因此,由于DEA只是一个评估各单元相对效率的工具,因此需要采用另一个途径来寻找改进的解决方案。
参考文献
[1] Coelli, T. J., Rao, D. S. P., O'Donnell, C. J., & Battese, G. E. (2005). An introduction to efficiency and productivity analysis. Springer Science & Business Media.
[2] Data envelopment analysis. (2020,June 9). In Wikipedia, the free encyclopedia. Retrieved June 20, 2020, from https://en.wikipedia.org/wiki/Data_envelopment_analysis
[3] Lee, C. Y., & Johnson, A. L. (2012). Two-dimensional efficiency decomposition to measure the demand effect in productivity analysis. European Journal of Operational Research, 216(3), 584-593.
[4] Returns to scale (2020, April 16). In Wikipedia, the free encyclopedia. Retrieved June 22, 2020, from https://en.wikipedia.org/wiki/Returns_to_scale
[5] Vörösmarty, G., & Dobos, I. (2020). A literature review of sustainable supplier evaluation with Data Envelopment Analysis. Journal of Cleaner Production, 121672.